<html><head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>SetMenuItemState</title></head>
<body bgcolor="#EFF1F0" link="#3A3966" vlink="#000000" alink="#000000">
<font face="Verdana, sans-serif" size="2"><p align="center"><b><font size="4">SetMenuItemState()</font></b></p>
<p><b>语法</b></p><blockquote>
<font color="#3A3966"><b>SetMenuItemState</b></font>(#Menu, MenuItem, State)</blockquote>

</blockquote>
<b>概要</b><br><blockquote>



Changes the specified MenuItem state. This functions allows you to display a 'check mark' next to the 
menu item text. 

 

</blockquote><p><b>参数</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>#Menu</i></td>
<td width="90%"> 
 
The menu to use. 

 

</td></tr>
<tr><td><i>MenuItem</i></td>
<td> 
 
The menu item to set the state for. 

 

</td></tr>
<tr><td><i>State</i></td>
<td> 
 
The state to set. The check is not displayed when State equals 0, if State equals something else then the 
'check mark' will be displayed. 

 

</td></tr>
</table>
</blockquote><p><b>返回值</b></p><blockquote>
无.


</blockquote><p><b>备注</b></p><blockquote>

<a href="getmenuitemstate.html">GetMenuItemState()</a> can be used to retrieve the current menu item state. 

 

</blockquote><p><b>示例</b></p><blockquote>

<pre><font face="Courier New, Courier, mono"size="2">  <b><font color="#3A3966">If</font></b> <font color="#3A3966">OpenWindow</font>(0, 200, 200, 200, 100, "SetMenuItemState Example")
    <b><font color="#3A3966">If</font></b> <font color="#3A3966">CreateMenu</font>(0,<font color="#3A3966"> WindowID</font>(0))
<font color="#3A3966">      MenuTitle</font>("Project")
<font color="#3A3966">        MenuItem</font>(1, "Changed")
<font color="#3A3966">        SetMenuItemState</font>(0, 1, 1)    <font color="#3A3966">; set check mark for the previously created menu item</font>
    <b><font color="#3A3966">EndIf</font></b>
    <b><font color="#3A3966">Repeat</font></b> : <b><font color="#3A3966">Until</font></b> <font color="#3A3966">WaitWindowEvent</font>() = <font color="#924B72">#PB_Event_CloseWindow</font>
  <b><font color="#3A3966"></font></b>
</font></pre>
<p><img src="../HelpPictures/setmenuitemstate.png"></p>

</blockquote><p><b>参阅</b></p><blockquote>

<a href="getmenuitemstate.html">GetMenuItemState()</a> 

</Blockquote><p><b>已支持操作系统 </b><Blockquote>所有</Blockquote></p><center>&lt;- <a href=opensubmenu.html>OpenSubMenu()</a> - <a href="index.html">Menu Index</a> - <a href="setmenuitemtext.html">SetMenuItemText()</a> -&gt;<br><br>

</body></html>